package com.guyaogg.common.valid.constraintvalidator;

import com.guyaogg.common.utils.StringUtils;
import com.guyaogg.common.valid.annotation.UpdateName;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

/**
 * @author 顾遥
 */
public class UpdateNameConstraintValidator implements ConstraintValidator<UpdateName, String> {
    @Override
    public boolean isValid(String value, ConstraintValidatorContext context) {

        return StringUtils.isUpdate(value);
    }
}
